adding boilerplate text at top of scripts missing it NO_JIRA#84
adding boilerplate text at top of scripts missing it NO_JIRA#84IsaacSugden merged 1 commit intomainfrom
Conversation
| '''Returns: identifier, smiles''' | ||
| mol_reader = MoleculeReader(os.path.join(directory, file)) | ||
| mol = mol_reader[0] | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| action='store_true', | ||
| help='Removes special characters from ids that may be problematic.' | ||
| ) | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| csvwriter = csv.writer(output_file, delimiter=',', quotechar='|') | ||
| csvwriter.writerow(['identifier', 'n_components', | ||
| 'component_a', 'component_b', 'neutral_a', 'neutral_b']) | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| # API group directories contain one or more API files and a directory of coformers | ||
| API_groups = [name for name in os.listdir( | ||
| args.input_dir) if os.path.isdir(os.path.join(args.input_dir, name))] | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| args.input_dir) if os.path.isdir(os.path.join(args.input_dir, name))] | ||
|
|
||
| exp_replaced = combo_count = 0 | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| for coformer_file in file_list(coformer_dir_path): | ||
| coformer_id, coformer_smiles = read_mol_file( | ||
| coformer_dir_path, coformer_file) | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| if (x, y) in list(experimental_dict.keys()): | ||
| exp_bool = experimental_dict[(x, y)] | ||
| exp_replaced += 1 | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| if args.clean_id: | ||
| api_id = string_scrubber(api_id) | ||
| coformer_id = string_scrubber(coformer_id) | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
| n_components = 2 | ||
| if api_smiles == coformer_smiles: | ||
| n_components = 1 | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
|
|
||
| combo_id = ".".join([api_id, coformer_id, str(exp_bool)]) | ||
| csvwriter.writerow([f'"{combo_id}"', n_components, api_smiles, coformer_smiles, "", ""]) | ||
|
|
There was a problem hiding this comment.
blank line contains whitespace
|



No description provided.